In today's computer world, it is very important to provide an intimate man-machine interface. The window-based system is an example of such an interface. The window-based computer interface system has become very popular in the last few years because of its simplicity and friendliness.
A conventional graphics system which utilizes a window-based interface system is illustrated in FIG. 1.
The system 10 of FIG. 1 comprises a CPU 12, a main system memory 14, a disk memory 16 and a graphics subsystem 18. All of these elements communicate with one another via the system bus 20.
The graphics subsystem comprises the graphics controller 30, the frame buffer 32, the digital-to-analog converter (DAC) 34, and the raster scan display device 36 which illustratively is a CRT display device The graphics controller 30 generates CRT control signals via lines 37 for controlling the display device 36 so that images can be displayed. The CRT control signals include horizontal synchronous signals, vertical synchronous signals, horizontal and vertical blanking signals, etc
The frame buffer 32 is comprised of video RAMs (VRAMs) 33. These VRAMs store the pixels which are displayed on the display device 36.
The graphics controller 30 transmits addresses and control signals via lines 38 to the frame buffer 32 to perform screen refresh operations Pixels located at the addresses received from the graphics controller 30 are read out from the frame buffer 32 on line 36 in serial form A display control circuit which is formed by the digital-to-analog converter 34 mixes the pixels read out of the frame buffer on line 36 with the control signals on line 37 to produce an analog signal suitable for use by the display terminal 36.
The graphics controller can also transmit data via the bus 39 to the frame buffer to change the content of the image displayed on the screen. This data can be retrieved from the disk system 16 or the system memory 14. Alternatively, this data can be generated by the CPU 12 or be generated by graphics processing operations performed inside the graphics controller 30 in response to commands issued by the CPU 12.
In the case of a window-based graphics system, some space is usually set aside in the main system memory 14 to serve as an off-screen memory or PIXMAP. The use of the off-screen memory varies depending on the application. One application of the off-screen memory is as follows. When a window interface is utilized, multiple overlapping windows are often displayed on a screen. The occluded, i.e. overlapped and thus non-visible, portions of these windows may be stored in the off-screen memory. In a conventional graphics system, such as the system 10 of FIG 1, the off-screen memory is formed by part of the main memory system. In different applications, the images or image portions stored in the off-screen memory may be processed in accordance with various graphic processing algorithms, e.g., drawing lines, circles, or making a block transfer. In a block transfer, a block of pixels of a window or window portion stored in the off-screen memory is swapped with a corresponding block of pixels in the frame buffer, so as to reverse the overlapping relationship of two windows (i.e., whereas before the swap window A overlaps window B, after the swap window B overlaps window A).
In a graphics system, pixels are viewed in a two-dimensional format, wherein each pixel has an address comprising an X coordinate and a Y coordinate. FIG. 2A shows a portion of a window wherein the pixels are arranged in this two-dimensional format. In FIG. 2A, the window portion has a width measured in pixels equal to WD and each line of pixels is labeled 0, 1, 2, . . . , n. On the other hand, pixels comprising a window or window portion are stored in the off-screen memory in a linear format as shown in FIG. 2B. Starting from a base address the rows of pixels of the window of FIG. 2A are stored one after the other, i.e., row 0 followed by the row 1, which is followed by the row 2, etc. The advantage of the linear format is that memory space is efficiently utilized.
However, in order to perform graphics processing on the pixels stored in t he off-screen memory, it is often necessary to convert between two dimensional, i.e., X, Y, addresses and linear addresses. This conversion is done in accordance with the following equation: EQU Linear Address=BASE ADDRESS+Y.WD+X (1)
In equation (1), X, Y define the two dimensional address, WD is the width of the window or window portion in the two dimensional format, and BASE ADDRESS is the initial linear address.
The foregoing equation involves a multiplication operation. The conventional graphics controller 30 of FIG. 1 cannot perform this multiplication operation. Therefore in the system 10 of FIG. 1, this multiplication has to be performed by the CPU 12. This reduces the bandwidth of the system 10 of FIG. 1 and the overall efficiency of the system is decreased.
A further problem with the system 10 of FIG. 1 occurs when a block of pixels is swapped between the off-screen memory (i.e., the main system memory 14) and the on-screen memory (i.e., the frame buffer 32). This may be done for example to reverse the overlapping relationship of two windows. This operation also has to be executed by the CPU further decreasing the efficiency of the system.
In view of the foregoing, it is an object of the present invention to provide a system architecture and graphics controller which overcome the shortcomings of the conventional system architecture and graphics controller discussed above. In particular, it is an object of the present invention to provide a system architecture and graphics controller in which two-dimensional to linear address conversions and pixel block swaps between off-screen and on-screen memory are not performed by the main CPU, but instead are performed by the graphics controller, to increase overall system efficiency by making better use of available CPU resources. It is also an object of the invention to provide an address processing unit for use in the graphics controller for converting between two-dimensional and linear addresses.